package com.didispace;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.mail.MessagingException;

/**
 * Created by anzhen on 2017-6-6.
 */
@Component
public class SendMailScheduled {
	@Autowired
	private SendMailService sendMailService;

	@Scheduled(cron = "0 0 0/1 6 * ? *")
	public void sendMail() throws MessagingException {
		sendMailService.sendMail();
	}
}
